<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>瀑布流</title>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" type="text/css" href="css/default.css">
  <style type="text/css">
    #gallery-wrapper {
      position: relative;
      max-width: 75%;
      width: 75%;
      margin: 50px auto;
    }

    img.thumb {
      width: 100%;
      max-width: 100%;
      height: auto;
    }

    .white-panel {
      position: absolute;
      background: white;
      border-radius: 5px;
      box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
      padding: 10px;
    }

    .white-panel h1 {
      font-size: 1em;
    }

    .white-panel h1 a {
      color: #A92733;
    }

    .white-panel:hover {
      box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
      margin-top: -5px;
      -webkit-transition: all 0.3s ease-in-out;
      -moz-transition: all 0.3s ease-in-out;
      -o-transition: all 0.3s ease-in-out;
      transition: all 0.3s ease-in-out;
    }
  </style>
</head>

<body>
  <script src="js/jquery-1.11.0.min.js"></script>
  <script src="js/pinterest_grid.js"></script>
  <script type="text/javascript">
    $(function () {
      $("#gallery-wrapper").pinterest_grid({
        // 配置参数
        no_columns: 5,
        padding_x: 15,
        padding_y: 20,
        margin_bottom: 50,
        single_column_breakpoint: 700
      });

    });
  </script>
  <section id="gallery-wrapper">
    <article class="white-panel">
      <img src="images/P_001.jpg" class="thumb">
      <h1><a href="#">我是1图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_002.jpg" class="thumb">
      <h1><a href="#">我是2图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_003.jpg" class="thumb">
      <h1><a href="#">我是3图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_004.jpg" class="thumb">
      <h1><a href="#">我是4图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_005.jpg" class="thumb">
      <h1><a href="#">我是5图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_006.jpg" class="thumb">
      <h1><a href="#">我是6图片</a></h1>
      <p>太棒了</p>
    </article>
    <article class="white-panel">
      <img src="images/P_007.jpg" class="thumb">
      <h1><a href="#">我是7图片</a></h1>
      <p>太棒了</p>
    </article>
  </section>
</body>

</html>